package main

import (
	"log"
	"net/http"

	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
)

func main() {

	// 开启日志
	logger, err := zap.NewDevelopment()
	if err != nil {
		log.Println("Zap Server Error: ", err)
	}

	logger.Info("Gin Start")

	engine := gin.Default()
	engine.GET("/", func(c *gin.Context) {
		c.JSON(http.StatusOK, gin.H{
			"errCode": 0,
			"errMsg":  "OK",
			"data":    nil,
		})
	})

	engine.Run(":8080")
}
